<template>
    <!--  机会管理主界面  -->
    <el-container :style="defaultHeight" id="bbb">
        <el-header style="height: 80px;width: 100%">
            <Header/>
        </el-header>
        <el-container style="width: 100%">
            <el-aside width="251px" class="el-sider">
                <Sider/>
            </el-aside>
            <el-container style="">
                <el-main style="padding-bottom: 0;">
                    <router-view/>
                </el-main>


                <el-footer height="66px"
                           style="background-color: white;text-align: center;line-height: 66px;width: 100%">
                    NPMS 2021

                </el-footer>
            </el-container>


        </el-container>
        <ChatComponent/>
    </el-container>
</template>

<script>


import Header from "@/components/Header/Header";
import Sider from "@/components/Sider/Sider";
import axios from "@/utils/http";
import ChatComponent from "@/components/Chat/ChatComponent";


export default {
    name: "NpmsHome",
    components: {ChatComponent, Header, Sider},
    data() {
        return {
            defaultHeight: {
                height: ""
            },
        };
    },
    methods: {
        getHeight() {
            this.defaultHeight.height = window.innerHeight + "px";
        },
    },
    created() {
        //页面创建时执行一次getHeight进行赋值，顺道绑定resize事件
        window.addEventListener("resize", this.getHeight);
        this.getHeight();
    },


}
</script>

<style lang="scss">
.el-sider {
    width: 251px;
    margin-top: 30px;
}


.el-row {

}

.el-main {
    padding: 0;

}

.chat-float {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #ffffff;
    right: 20px;
    top: 85%;
    transition: all ease-in-out 300ms;
    border-radius: 50px;
    box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;

}


.chatExpand {
    height: 800px;
    width: 500px;
    top: 10%;

    border-radius: 0;
    cursor: auto;
}
</style>